package org.cuit.echo.seon;

// 外观类：家庭影院外观
public class HomeTheaterFacade {
    private final Light light;
    private final SoundSystem soundSystem;
    private final Projector projector;

    public HomeTheaterFacade(Light light, SoundSystem soundSystem, Projector projector) {
        this.light = light;
        this.soundSystem = soundSystem;
        this.projector = projector;
    }

    // 启动影院模式
    public void watchMovie() {
        System.out.println("准备开始看电影...");
        light.dim();
        soundSystem.on();
        soundSystem.setVolume(10);
        projector.on();
        projector.setInput("HDMI");
        System.out.println("电影开始！");
    }

    // 关闭影院模式
    public void endMovie() {
        System.out.println("电影结束，关闭家庭影院...");
        light.on();
        soundSystem.off();
        projector.off();
    }
}
